import { Controller } from 'egg'


export default class UserController extends Controller {
    async create() {
        const { ctx } = this;
        const { name } = ctx.request.body;
        console.log(ctx.model)
        let user = await ctx.service.user.create();
        ctx.body = {
            name,
            id: user.id
        }
    }
}